package com.leaves.common.util;

import cn.hutool.core.io.file.FileNameUtil;
import cn.hutool.core.util.URLUtil;
import cn.hutool.http.HttpUtil;

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.LocalDateTime;

/**
 * @Author: LEAVES
 * @Version 1.0
 * @Date: 2022年09月06日  19时29分34秒
 * @Description:
 */
public class MainTest {

    public static void main(String[] args) {

//        double x = 4.2;
//        double y = 6;
//        double z = x - y;
//        System.out.println("z  = " + z);
//        String str = String.format("%.2f", z);
//        System.out.println("str = " + str);
//
//
//        String a= "1";
//        System.out.println("zz = " + a.equals(1));
//        System.out.println("zz = " + a.equals("1"));
//
//
////        String s = "E:\\app\\wamp\\www\\idnex.php";
////        File file = new File(s);
////        String name = file.getName();
////        System.out.println("name = " + name);
//
//        LocalDateTime now = LocalDateTime.now();
//        LocalDateTime yesterday = now.minusDays(1);
//        boolean after = now.isAfter(yesterday);
//        boolean before = now.isBefore(yesterday);
//        boolean equal = now.isEqual(yesterday);
//        System.out.println("now = " + now);
//        System.out.println("yesterday = " + yesterday);
//        System.out.println("after = " + after);
//        System.out.println("before = " + before);
//        System.out.println("equal = " + equal);

        try {
            URL url = new URL("http://59.48.119.142:8091/server/96/group1/M00/1D/D1/CgJUGmP0dwKAJ90UAAAAPd0xCUM30.json");
            InputStream stream = URLUtil.getStream(url);
//            String name = FileNameUtil.getName(file);

        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

    }
}
